[pull] main from fern-api:main#732
Merged
Merged
Conversation
## Description Linear ticket: Refs https://linear.app/buildwithfern/issue/FER-10254/obs-cli-automation-mode-enrichment-three-leg-failure-flow-process Adds CLI-side automation telemetry enrichment and the three-leg failure reporting flow for automation runs. This intentionally does not close the Linear ticket; remaining work still needs to close the gap in the CLIs. ## Changes Made - Add CLI v1 automation telemetry context/event modeling, including GitHub run/config metadata and action context inherited from the wrapper. - Route automation failures through Sentry, PostHog, and the automation event API, with Sentry tags/context aligned to the actions wrapper. - Add a dedicated PostHog automation event path so automation events use their event name and run ID distinct ID instead of the legacy CLI command shape. - [ ] Updated README.md generator (if applicable) ## Testing - [x] Unit tests added/updated - [x] Manual testing completed - [x] `pnpm --filter @fern-api/cli test src/telemetry/__test__/SentryClient.test.ts src/cli-context/__test__/TaskContextImpl.test.ts` - [x] `pnpm turbo run compile --filter @fern-api/task-context --filter @fern-api/posthog-manager --filter @fern-api/cli --filter @fern-api/cli-v2` passed before rebasing onto current `main` - [ ] Current `origin/main` broad compile has unrelated `@fern-api/remote-workspace-runner` TypeScript errors; focused tests still pass on this branch
## Description Linear ticket: Refs Report escaped fatal CLI errors through the existing telemetry path for packaged production CLI runs, while preserving local/dev crash behavior. ## Changes Made - Added process-level handlers for `uncaughtException` and `unhandledRejection` in packaged production CLI runs. - Shared the same telemetry initialization gate between the process handlers and Sentry setup, including `FERN_DISABLE_TELEMETRY`, `--local`, local dev builds, and production CLI detection. - Updated SentryClient tests for the new initialization gate. - [ ] Updated README.md generator (if applicable) ## Testing - [x] Unit tests added/updated - [x] Manual testing completed Tested with: `pnpm --filter @fern-api/cli test -- src/telemetry/__test__/SentryClient.test.ts` Made with [Cursor](https://cursor.com)
Co-authored-by: FedeZara <43422322+FedeZara@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )